<?php
/**
 * 云打印平台，agent模板
 * @author lss
 * 2017-10-11
 */
namespace soa\mp\cloudPrint;

use soa\client;

class agentTemplate  extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://mp.kuaidihelp.com/';
    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_mp';

	//agent添加模板
	public function add($agentGuid,$brand,$templateId){
		return $this->post("api/cloudPrint/agentTemplate/add",[
			"agent_guid" => $agentGuid,
			"brand" => $brand,
			"template_id" => $templateId,
		]);
	}

	//删除模板
	public function del($agentGuid,$info = [],$limit = [],$orderBy = "update_time DESC"){
		return $this->post("api/cloudPrint/agentTemplate/del",[
			"agent_guid" => $agentGuid,
			"info" => $info,
			"limit" => $limit,
			"orderBy" => $orderBy,
		]);
	}

	//获取agent的模板
	public function getByAgent($agentGuid,$info = [],$limit = [],$orderBy = "update_time DESC"){
		return $this->post("api/cloudPrint/agentTemplate/getByAgent",[
			"agent_guid" => $agentGuid,
			"info" => $info,
			"limit" => $limit,
			"orderBy" => $orderBy,
		]);
	}
}